﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BoxVideo2.ascx.cs" Inherits="GUI.Controls.Video.BoxVideo2" %>
<div class="box-video style1 clearfix">
    <ul class="clearfix">
        <asp:Literal runat="server" ID="ltrData"></asp:Literal>
    </ul>
    <div class="btn-embed clearfix">
        <asp:Literal runat="server" ID="ltrButtons"></asp:Literal>
    </div>
</div>
<script type="text/javascript">
    (function() {
        var videoData = <%=VideoData %>;
        for (var i = 0; i < videoData.length; i++) {
            sohavideo.pushVideoToCache(videoData[i]);
        }
        $('.box-video.style1 .btn-embed a').each(function(){
            $(this).click(function () {
                if ($(this).hasClass('active'))
                    return;
                $('.box-video.style1 .btn-embed a').removeClass('active');
                $(this).addClass('active');
                var videoId = parseInt($(this).attr('rel'));
                sohavideo.highlightVideo(videoId,641,426);
            });
        });
        if (sohavideo.isTablet()) {
            sohavideo.highlightVideo(videoData[0]["Id"],641,426);
        }
    })();
</script>
